<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>编辑</title>
		<link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" />
		<link href="../../kitAdmin/css/app.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="../../plugins/select2/dist/css/select2.min.css"/>
	</head>

	<body>
		<div class='kit-table'>
			<div style='margin:10px'>
				
		<form class='layui-form' action='' lay-filter='form-edit'>
			<input type='hidden' name='uniqueid'  data-link='{:uniqueid}' />
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>uniqueid</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:uniqueid}' id='_uniqueid' name='uniqueid' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>教材</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:material}' id='_material' name='material' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>学生id</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:studentId}' id='_studentId' name='studentId' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>销售id(负责人)</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:sellerId}' id='_sellerId' name='sellerId' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>教师ID</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:teacherId}' id='_teacherId' name='teacherId' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>购买时长</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:hoursEnrolled}' id='_hoursEnrolled' name='hoursEnrolled' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>剩余时长(暂时保留，也可根据完成时长计算出来)</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:hoursRemaining}' id='_hoursRemaining' name='hoursRemaining' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>完成时长</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:lessonsCompleted}' id='_lessonsCompleted' name='lessonsCompleted' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>状态</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:state}' id='_state' name='state' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>购买日期</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:purchaseDate}' id='_purchaseDate' name='purchaseDate' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>is_delete</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:isDelete}' id='_isDelete' name='isDelete' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>付款方式</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:payMethod}' id='_payMethod' name='payMethod' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>活动方式</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:eventsWay}' id='_eventsWay' name='eventsWay' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>课程类型（新报课程、续报课程、补课时）</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:type}' id='_type' name='type' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>备注</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:remark}' id='_remark' name='remark' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>购买金额</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:money}' id='_money' name='money' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>课程级别</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:materialLevel}' id='_materialLevel' name='materialLevel' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>外教名字</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:teacherName}' id='_teacherName' name='teacherName' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>课程中文名称</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:materialNameZh}' id='_materialNameZh' name='materialNameZh' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>课程英文名称</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:materialNameEn}' id='_materialNameEn' name='materialNameEn' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>级别</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:levelName}' id='_levelName' name='levelName' class='layui-input'>
					</div>
				</div>
				<div class='layui-inline'>
					<label class='layui-form-label'>真实名字</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:sellerName}' id='_sellerName' name='sellerName' class='layui-input'>
					</div>
				</div>
			</div>
			<div class='layui-form-item'>
				<div class='layui-inline'>
					<label class='layui-form-label'>登录名</label>
					<div class='layui-input-inline'>
						<input type='text' placeholder=''data-link='{:sellerUname}' id='_sellerUname' name='sellerUname' class='layui-input'>
					</div>
				</div>
			</div>
		</form>
			</div>
		</div>
		<script src="../../common/js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/base.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/jsviews/jsviews.js" type="text/javascript"></script>
		<script src="../../plugins/select2/dist/js/select2.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var uid = getQueryVariable('uniqueid');
			jQuery(document).ready(function() {
				bindFormData();
			});
			var callback_save=function(){
				return $('.layui-form').serialize();
			}
			function bindFormData(){
				if(uid){
					$.ajax({
						url:baseUrl+'/purchaseCourseView2s/'+uid,
						type:'get',
						success:function(data){
							$.link(true, ".kit-table", data.data);
							$('select').select2().change();
						},
						error:function(){
							parent.layer.alert('系统或网络错误！');
						}
					});
				}
			}
		</script>
	</body>

</html>
